package com.minglead.crawler.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.Objects;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class YqMediaEntity {
    //标题
    private String name;

    //摘要，（前400字符，用于展示）
    private String digest;

    //正文详情
    private String content;

    //媒体
    private String media;

    //热度
    private Integer hot;

    //涉及城市
    private String city;

    //发布时间
    private Date publishTime;

    //发布人昵称
    private String publishUserName;

    //来源URL
    private String link;

    //数据原始id
    private String originId;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        YqMediaEntity that = (YqMediaEntity) o;
        return Objects.equals(originId, that.originId);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(originId);
    }
}
